<?php

/**
 *  @FileComment            [用户角色三表视图模型]
 *  @ProjectName             项目名称：JDshop
 *  @FileName                   文件名称：AdminRoleListViewModel.class.php
 *  @Author                       yuerengui <596580041@qq.com>
 *  @Date                          2014-10-26 0:21:17
 *  *
 */
class AdminRoleListViewModel extends ViewModel {

        public $table = 'admin';
        public $view = array(
            'admin' => array('_type' => 'INNER'),
            'admin_role' => array('_type' => 'INNER', '_on' => '__admin__.aid=admin_role.aid'),
            'role' => array('_type' => 'INNER', '_on' => '__role__.rid=admin_role.rid')
        );

        public function get_data($where) {
                return $this->where($where)->all();
        }

}
